<div id="page" class="page">
  <div class="wrap">
    <% if (page > 1 && page < pages) { %>
      <a class="prev" href="/?categoryId=<%= categoryId %>&page=<%= page-1 %>"><span>&lt;&lt; </span>prev</a>
      <a class="next" href="/?categoryId=<%= categoryId %>&page=<%= page+1 %>">next<span> &gt;&gt;</span></a>
    <% } else if (page < pages && page == 1) { %>
      <a class="next" href="/?categoryId=<%= categoryId %>&page=<%= page+1 %>">next<span> &gt;&gt;</span></a>
    <% } else if (page > 1 && pages == page) { %>
      <a class="prev" href="/?categoryId=<%= categoryId %>&page=<%= page-1 %>"><span>&lt;&lt; </span>prev</a>
    <% } else { %>
      <a href="javascript:;"></a>
    <% } %>
  </div>
</div>
